package org.whuims.common.proper;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class Config {
	private Config(){
		//do nothing.
	}
	
	private static Properties prop;

	public static String getProp(String arg){
		if(prop==null){
			prop=new Properties();
			try {
				prop.load(new FileInputStream(new File("resource/config.prop")));
			} catch (IOException e) {
				e.printStackTrace();
			}
			
		}
		return prop.getProperty(arg);
	}
	
	public static void main(String[] args) {
		System.out.println(Config.getProp("test"));
	}
}
